GtkWidgetPath: Make gtk_widget_path_prepend_type() return nothing.
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 19 Nov 2010 17:58:19 +0000 (18:58 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 4 Dec 2010 14:39:18 +0000 (15:39 +0100)
It's senseless to always return 0

gtk/gtkwidgetpath.c
gtk/gtkwidgetpath.h

index 88d2b6dc19a3904587aa8bb95f91439b2c709739..633fe43c4470018900bd20a4d47bc2a1aaa9352b 100644 (file)
@@ -230,23 +230,19 @@ gtk_widget_path_length (const GtkWidgetPath *path)
  *
  * Prepends a widget type to the widget hierachy represented by @path.
  *
- * Returns: the position where the element was inserted
- *
  * Since: 3.0
  **/
-guint
+void
 gtk_widget_path_prepend_type (GtkWidgetPath *path,
                               GType          type)
 {
   GtkPathElement new = { 0 };
 
-  g_return_val_if_fail (path != NULL, 0);
-  g_return_val_if_fail (g_type_is_a (type, GTK_TYPE_WIDGET), 0);
+  g_return_if_fail (path != NULL);
+  g_return_if_fail (g_type_is_a (type, GTK_TYPE_WIDGET));
 
   new.type = type;
   g_array_prepend_val (path->elems, new);
-
-  return 0;
 }
 
 /**
index f36ebcb8305de0f83c2a8da345562207b6a40115..18ee05f290be573dc570db58fe867ace36770de5 100644 (file)
@@ -37,7 +37,7 @@ guint           gtk_widget_path_length              (const GtkWidgetPath *path);
 
 guint           gtk_widget_path_append_type         (GtkWidgetPath       *path,
                                                      GType                type);
-guint           gtk_widget_path_prepend_type        (GtkWidgetPath       *path,
+void            gtk_widget_path_prepend_type        (GtkWidgetPath       *path,
                                                      GType                type);
 
 GType               gtk_widget_path_iter_get_widget_type (const GtkWidgetPath *path,